#ifndef _FB_CAMERA_H_
#define _FB_CAMERA_H_

#include "abstract_camera.h"

namespace camera
{

///////////////////////////////////////////////////////
///	\brief	Framebuffer Camera
///         Provides access to the primary video surface
///         You can have multiple cameras running on the
///         FB with different ViewPorts if you want.
///////////////////////////////////////////////////////
class FbCamera : public AbstractCamera 
{
public:
    /**
    * Initialize camera. Provides sensible defaults
    * @param _From      Camera points From where
    * @param _To        Camera points To Where
    * @param _Up        What's the up direction ?
    * @param _FOV       What's the Field of View (Degrees)
    * @param _Aspect    What's the aspect ration
    * @param _ClipRange What's the Clip Range (near / far Z range)
    */
                        FbCamera( const math::Vec3& _From = math::Vec3(0, 0, 0),
                                        const math::Vec3& _To   = math::Vec3(0, 0, 1),
                                        const math::Vec3& _Up   = math::Vec3(0, 1, 0),
                                        float _FOV = 60.0f, 
                                        float _Aspect = 1.0f, 
                                        const math::Vec2& _ClipRange = math::Vec2(1, 5000));
    /**
    * Delete the camera
    */                        
    virtual             ~FbCamera();

    /**
    * Start a rendering pass. This should be done once per frame, per relevant camera. 
    * Clears the buffers and calls begin on the scene).
    * Make sure no other cameras are currently rendering!
    * @param _pDevice   D3D9 Device to begin rendering into
    * @param _Clear     Should it clear any buffers as well ?
    */                        
    virtual bool        StartFrame(bool _Clear = true);

    /**
    * Ends a frame, calling EndScene on the device
    * Make sure no other cameras are currently rendering!
    * @param _pDevice   D3D9 Device to begin rendering into
    */                        
    virtual bool        EndFrame();

    /**
    * Display the current framebuffer
    * @param _pDevice   D3D9 Device to begin rendering into
    */                        
    virtual bool        Show();

};
}  // end namespace camera

#endif  // _FB_CAMERA_H_